import request from "../../http";

export function getIntendedCompanyDetails(params) {
  return request({
    url: '/building/investment/intendedUser/intendedCompanyDetails',
    method: 'GET',
    params
  })
}

export function getMyIntendedBuildings(params) {
  return request({
    url: '/building/investment/intendedUser/myIntendedBuildings',
    method: 'GET',
    params
  })
}

export function getIntendedCompanyList(params) {
  return request({
    url: '/building/investment/intendedUser/intendedCompanyList',
    method: 'GET',
    params
  })
}

export function getBuildingInfo(id) {
  return request({
    url: `/building/investment/info/get/${id}`,
    method: 'GET'
  })
}

export function addBuilding(data) {
  return request({
    url: `/building/investment/info/add`,
    method: 'POST',
    data
  })
}

export function updateBuilding(data) {
  return request({
    url: `/building/investment/info/update`,
    method: 'PUT',
    data
  })
}

// 企业空间 - 我的楼宇
// 获取我的楼宇列表
export function getMyBuildings(params) {
  return request({
    url: `/building/investment/info/myBuildings`,
    method: 'GET',
    params
  })
}

// 业主楼宇认证是否通过 
export function getUserAuthInfo() {
  return request({
    url: `/building/investment/ownerAuth/getUserAuthInfo`,
    method: 'GET'
  })
}

// 上架下架接口 
export function ifUp(data) {
  return request({
    url: `/building/investment/info/updateState`,
    method: 'PUT',
    data
  })
}
